package com.buercorp.wangyu.oop;

public class Demo {
    private String name;
    private int age;

//    alt+ins
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        if(age > 120 || age < 0) {
            this.age = 3;
        } else {
            this.age = age;
        }
    }
}
